main() {
  Student student = Student(name: "张三", age: 18, height: 1.80, school: "清华大学");
  student.study();
}

//定义一个父类
class Person {
  String name;
  int? age;
  double height;
  Person({required this.name, this.age, this.height = 1.80});
}

//定义一个子类
class Student extends Person {
  String? school;
  //定义构造函数，升级为可命名参数
  Student(
      {required super.name,
      required super.age,
      required super.height,
      required this.school});
  void study() {
    print("学生正在学习");
  }
}
